<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateEmpleadoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="4" style="width: 70%">
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_numEmpleado}" for="numEmpleado" />
                    <h:inputText id="numEmpleado" value="#{empleadoController.selected.numEmpleado}" title="#{bundle.CreateEmpleadoTitle_numEmpleado}" required="true" requiredMessage="#{bundle.CreateEmpleadoRequiredMessage_numEmpleado}"/>
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_fecNacimiento}" for="fecNacimiento" />
                    <h:inputText id="fecNacimiento" value="#{empleadoController.selected.fecNacimiento}" title="#{bundle.CreateEmpleadoTitle_fecNacimiento}" required="true" requiredMessage="#{bundle.CreateEmpleadoRequiredMessage_fecNacimiento}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_sexo}" for="sexo" />
                    <h:selectOneListbox id="sexo" value="#{empleadoController.selected.sexo}" title="#{bundle.CreateEmpleadoTitle_sexo}" required="true" requiredMessage="#{bundle.CreateEmpleadoRequiredMessage_sexo}" >
                        <f:selectItem itemValue="0" itemLabel="Masculino" />
                        <f:selectItem itemValue="1" itemLabel="Femenino" />	   							
                     </h:selectOneListbox>
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_nombre}" for="nombre" />
                    <h:inputText id="nombre" value="#{empleadoController.selected.nombre}" title="#{bundle.CreateEmpleadoTitle_nombre}" required="true" requiredMessage="#{bundle.CreateEmpleadoRequiredMessage_nombre}"/>
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_appaterno}" for="appaterno" />
                    <h:inputText id="appaterno" value="#{empleadoController.selected.appaterno}" title="#{bundle.CreateEmpleadoTitle_appaterno}" required="true" requiredMessage="#{bundle.CreateEmpleadoRequiredMessage_appaterno}"/>
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_apmaterno}" for="apmaterno" />
                    <h:inputText id="apmaterno" value="#{empleadoController.selected.apmaterno}" title="#{bundle.CreateEmpleadoTitle_apmaterno}" required="true" requiredMessage="#{bundle.CreateEmpleadoRequiredMessage_apmaterno}"/>
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_telefono}" for="telefono" />
                    <h:inputText id="telefono" value="#{empleadoController.selected.telefono}" title="#{bundle.CreateEmpleadoTitle_telefono}" />
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_email}" for="email" />
                    <h:inputText id="email" value="#{empleadoController.selected.email}" title="#{bundle.CreateEmpleadoTitle_email}" />
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_perfilId}" for="perfilId" />
                    <h:selectOneMenu id="perfilId" value="#{empleadoController.selected.perfilId}" title="#{bundle.CreateEmpleadoTitle_perfilId}" required="true" requiredMessage="#{bundle.CreateEmpleadoRequiredMessage_perfilId}">
                        <f:selectItems value="#{perfilController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateEmpleadoLabel_departamentoId}" for="departamentoId" />
                    <h:selectOneMenu id="departamentoId" value="#{empleadoController.selected.departamentoId}" title="#{bundle.CreateEmpleadoTitle_departamentoId}" required="true" requiredMessage="#{bundle.CreateEmpleadoRequiredMessage_departamentoId}">
                        <f:selectItems value="#{departamentoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    
                    <!--h:outputLabel value="#{bundle.CreateEmpleadoLabel_usuarioId}" for="usuarioId" />
                    <h:selectOneMenu id="usuarioId" value="#{empleadoController.selected.usuarioId}" title="#{bundle.CreateEmpleadoTitle_usuarioId}" >
                        <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu-->
                </h:panelGrid>
                
                <div class="navbar">
                    <div class="container">
                      <a href="#menu" class="menu-trigger meteocon" data-meteocon="M" data-toggle="panel" data-target="#menu"></a>
                      <div class="nav-collapse collapse">
                        <nav id="menu">
                          <ul class="nav docs-navbar-menu">
                            <li><h:commandLink styleClass="btn btn-info" action="#{empleadoController.create}" value="#{bundle.CreateEmpleadoSaveLink}" /></li>
                            <li>&nbsp;</li>
                            <li><h:commandLink styleClass="btn btn-info" action="#{empleadoController.prepareList}" value="#{bundle.CreateEmpleadoShowAllLink}" immediate="true"/></li>
                          </ul>
                        </nav>
                      </div>
                    </div>
                </div>
                
            </h:form>
        </ui:define>
    </ui:composition>

</html>
